// Copyright 2017 The Kubernetes Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

@import '../../variables';

kd-namespace-select {
  display: block;
  padding-left: 3 * $baseline-grid;
  padding-top: 0;

  .kd-namespace-select-title {
    color: $foreground-2;
    font-size: $caption-font-size-base;
  }
}

.kd-namespace-select-input-container {
  font-family: $font-family-monospace;
  margin: $baseline-grid 0;
  max-width: 100%;
}

md-select {
  &.kd-namespace-select {
    font-size: $body-font-size-base;
    padding: 0 $baseline-grid;

    .md-select-value {
      padding-bottom: .5 * $baseline-grid;
      padding-right: 0;

      span {
        color: $foreground-1;
        font-family: $font-family-medium;
      }

      .md-select-icon {
        margin: 0 0 0 (3 * $baseline-grid);
        opacity: .54;
        width: auto;
      }
    }

    &:focus {
      .md-select-value {
        color: inherit;
      }
    }
  }

  &:not([disabled]) {
    &:focus {
      &.kd-namespace-select {
        .md-select-value {
          border-bottom: 1px solid $foreground-4;
          padding-bottom: .5 * $baseline-grid;
        }
      }
    }
  }
}

.kd-namespace-select-container {
  md-content {
    padding: 0;
  }
}

.kd-namespace-select-input-header {
  align-items: center;
  display: flex;
  padding: (2 * $baseline-grid) 0 (2 * $baseline-grid) (2 * $baseline-grid);

  md-input-container {
    height: 3 * $baseline-grid;
    margin: 0;
    padding: 0;

    .kd-namespace-select-input {
      border: 0;
      height: 3 * $baseline-grid;
      outline: none;
      padding: 0;
      width: 100%;
    }
  }
}

.kd-namespace-select-input-header-border {
  border-bottom: 1px solid $foreground-4;
}
